package com.info33.platform.business.dialogue.controller;

import com.info33.platform.common.mvc.controller.BaseController;
import com.info33.platform.business.dialogue.entity.AiToken;
import com.info33.platform.business.dialogue.service.AiTokenService;
import com.info33.platform.common.mvc.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

/**
 * @author LF
 * @date 2023-10-16 10:11:52
 */
@RestController
@RequestMapping("/AiToken")
@Api(tags = "人工智能_会话token")
public class AiTokenController extends BaseController<AiTokenService, AiToken> {

    private final AiTokenService aiTokenService;

    @Autowired
    public AiTokenController(AiTokenService aiTokenService) {
        super(aiTokenService);
        this.aiTokenService = aiTokenService;
    }

    /**---------------------screen大屏---------------------*/

    /**----------------------app移动端----------------------*/

    /**-----------------------pc后台-----------------------*/

    @GetMapping("/ai/getToken")
    @ApiOperation(value = "获取会话token")
    public Result<String> getToken() throws IOException {
        return aiTokenService.getToken();
    }



}
